using System;
using System.Data;
using System.Linq;
using System.ComponentModel;
using System.Reflection;
using System.Collections.Generic;
using DataObject.Model;
using DataObject.Database;

public partial class ReservationMapper
{
    #region ToSingle

    public static ReservationDTO ToSingle(Reservation entity)
    {
        if (entity == null)
        {
            return null;
        }
        return new ReservationDTO
        {
            Alarm = entity.Alarm,
            BoatID = entity.BoatID,
            CheckInDate = entity.CheckInDate,
            CreatedByID = entity.CreatedByID,
            CreationDate = entity.CreationDate,
            CruiseCurrency = entity.CruiseCurrency,
            CruisePackage = entity.CruisePackage,
            CruiseRate = entity.CruiseRate,
            DepartureDate = entity.DepartureDate,
            Deposit = entity.Deposit,
            ExtraService = entity.ExtraService,
            GuestID = entity.GuestID,
            HotelAddress = entity.HotelAddress,
            ConfirmationEmail = entity.ConfirmationEmail,
            IsCharter = entity.IsCharter,
            IsShuttle = entity.IsShuttle,
            ModifiedByID = entity.ModifiedByID,
            ModifiedDate = entity.ModifiedDate,
            Note = entity.Note,
            NumOfCabins = entity.NumOfCabins,
            NumOfNights = entity.NumOfNights,
            NumOfPax = entity.NumOfPax,
            Paid = entity.Paid,
            PaidFee = entity.PaidFee,
            PaidStatus = entity.PaidStatus,
            Pickup = entity.Pickup,
            ReservationCode = entity.ReservationCode,
            ReservationID = entity.ReservationID,
            RouteNumber = entity.RouteNumber,
            ShuttlePrice = entity.ShuttlePrice,
            Status = entity.Status,
            SubRouteCode = entity.SubRouteCode,
            SubTotal = entity.SubTotal
        };
    }

    #endregion

    #region ToEntity

    public static Reservation ToEntity(Reservation entity, ReservationDTO businessobject)
    {
        if (businessobject == null)
        {
            return null;
        }
        entity.Alarm = businessobject.Alarm;
        entity.BoatID = businessobject.BoatID;
        entity.CheckInDate = businessobject.CheckInDate;
        entity.CreatedByID = businessobject.CreatedByID;
        entity.CreationDate = businessobject.CreationDate;
        entity.CruiseCurrency = businessobject.CruiseCurrency;
        entity.CruisePackage = businessobject.CruisePackage;
        entity.CruiseRate = businessobject.CruiseRate;
        entity.DepartureDate = businessobject.DepartureDate;
        entity.Deposit = businessobject.Deposit;
        entity.ExtraService = businessobject.ExtraService;
        entity.GuestID = businessobject.GuestID;
        entity.HotelAddress = businessobject.HotelAddress;
        entity.ConfirmationEmail = businessobject.ConfirmationEmail;
        entity.IsCharter = businessobject.IsCharter;
        entity.IsShuttle = businessobject.IsShuttle;
        entity.ModifiedByID = businessobject.ModifiedByID;
        entity.ModifiedDate = businessobject.ModifiedDate;
        entity.Note = businessobject.Note;
        entity.NumOfCabins = businessobject.NumOfCabins;
        entity.NumOfNights = businessobject.NumOfNights;
        entity.NumOfPax = businessobject.NumOfPax;
        entity.Paid = businessobject.Paid;
        entity.PaidFee = businessobject.PaidFee;
        entity.PaidStatus = businessobject.PaidStatus;
        entity.Pickup = businessobject.Pickup;
        entity.ReservationCode = businessobject.ReservationCode;
        entity.ReservationID = businessobject.ReservationID;
        entity.RouteNumber = businessobject.RouteNumber;
        entity.CruiseCurrency = businessobject.CruiseCurrency;
        entity.ShuttlePrice = businessobject.ShuttlePrice;
        entity.Status = businessobject.Status;
        entity.SubRouteCode = businessobject.SubRouteCode;
        entity.SubTotal = businessobject.SubTotal;
        return entity;
    }

    #endregion

    #region ToBusinessObject

    public static ReservationDTO ToBusinessObject(Reservation entity)
    {
        if (entity == null)
        {
            return null;
        }
        return new ReservationDTO
        {
            Alarm = entity.Alarm,
            BoatID = entity.BoatID,
            CheckInDate = entity.CheckInDate,
            CreatedByID = entity.CreatedByID,
            CreationDate = entity.CreationDate,
            CruiseCurrency = entity.CruiseCurrency,
            CruisePackage = entity.CruisePackage,
            CruiseRate = entity.CruiseRate,
            DepartureDate = entity.DepartureDate,
            Deposit = entity.Deposit,
            ExtraService = entity.ExtraService,
            GuestID = entity.GuestID,
            HotelAddress = entity.HotelAddress,
            ConfirmationEmail = entity.ConfirmationEmail,
            IsCharter = entity.IsCharter,
            IsShuttle = entity.IsShuttle,
            ModifiedByID = entity.ModifiedByID,
            ModifiedDate = entity.ModifiedDate,
            Note = entity.Note,
            NumOfCabins = entity.NumOfCabins,
            NumOfNights = entity.NumOfNights,
            NumOfPax = entity.NumOfPax,
            Paid = entity.Paid,
            PaidFee = entity.PaidFee,
            PaidStatus = entity.PaidStatus,
            Pickup = entity.Pickup,
            ReservationCode = entity.ReservationCode,
            ReservationID = entity.ReservationID,
            RouteNumber = entity.RouteNumber,
            ShuttlePrice = entity.ShuttlePrice,
            Status = entity.Status,
            SubRouteCode = entity.SubRouteCode,
            SubTotal = entity.SubTotal
        };
    }

    #endregion

}
